package v1ch05.enums;

/**
 * Created with IntelliJ IDEA.
 * 枚举测试
 *
 * @author ：liaojun
 * @date ：2020-12-03 15:21
 * @description ：
 */
public enum Province {
	
	HB(1, "湖北"), HN(2, "湖南"), GD(3, "广东");
	
	private Province(int index, String name) {
		this.name = name;
		this.index = index;
	}
	
	private Integer index;
	private String name;
	
	public Integer getIndex() {
		return index;
	}
	
	public String getName() {
		return name;
	}
	
	public void setIndex(Integer index) {
		this.index = index;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public static void main(String[] args) {
		Province p;
		p = Province.GD;
		System.out.println(p.getName());
	}
}
